package org.flycloud.web.sso.common;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class UserSession implements Serializable {

	private static final long serialVersionUID = 1L;
	private String id;
	private String userName;
	private String characterName;
	private List<String> roles = new ArrayList<>();
	private List<String> permissions = new ArrayList<>();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getCharacterName() {
		return characterName;
	}

	public void setCharacterName(String characterName) {
		this.characterName = characterName;
	}

	public List<String> getRoles() {
		return roles;
	}

	public void setRoles(List<String> roles) {
		this.roles = roles;
	}

	public List<String> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<String> permissions) {
		this.permissions = permissions;
	}

	public void addRole(String role) {
		this.roles.add(role);
	}

	public void addPermission(String permission) {
		this.permissions.add(permission);
	}

}
